package com.yj.rselasticsearch.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yj.common.core.domain.AjaxResult;
import com.yj.common.core.domain.entity.FileInfo;
import com.yj.common.core.domain.entity.RetrievalRecord;
import com.yj.rselasticsearch.domain.dto.FileInfoDto;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

public interface FileInfoService extends IService<FileInfo> {

    void uploadFileInfo(FileInfo fileInfo);

    /**
     * 根据id删除附件信息
     *
     * @param id
     * @return
     */
    AjaxResult deleteFileInfoById(Integer id);

    /**
     * 附件上传
     *
     * @return
     */
    AjaxResult fileUpload(MultipartFile file);

    /**
     * 查询单条详情
     *
     * @param id
     * @return
     */
    AjaxResult selectOne(Integer id);


    /**
     * 分页查询文件信息列表
     *
     * @param fileInfo
     * @return
     */
    AjaxResult pageSearchFileInfo(FileInfoDto fileInfo, HttpServletRequest request);


    /**
     * 更新文件信息
     *
     * @return
     */
    void updateByFileInfoId(FileInfo fileInfo);
}